import { $Http } from '@/config/service/http';

export enum Api {
  // 档案打印
  printAudit = '/dms/archivesFilePrint/audit', // 审核
  printAutoProduct = '/dms/archivesFilePrint/autoProductFormInfo', // 自动生成表单
  printDelete = '/dms/archivesFilePrint/delete', // 删除
  printGet = '/dms/archivesFilePrint/get', // 详情
  printGetList = '/dms/archivesFilePrint/getFileListById', // 获取文件列表
  pringPage = '/dms/archivesFilePrint/page', // 分页查询
  printSave = '/dms/archivesFilePrint/save' // 保存
}

/**
 * 审核
 * @param params
 */
export const printAudit = (params) => {
  return $Http.api(Api.printAudit, params, 'post');
};

/**
 * 自动生成表单
 * @param params
 */
export const printAutoProduct = (params) => {
  return $Http.api(Api.printAutoProduct, params, 'post');
};

/**
 * 删除
 * @param params
 */
export const printDelete = (id) => {
  return $Http.api(Api.printDelete + '/' + id, null, 'post');
};

/**
 * 详情
 * @param params
 */
export const printGet = (id) => {
  return $Http.api(Api.printGet + '/' + id, null, 'get');
};

/**
 * 获取文件列表
 * @param params
 */
export const printGetList = (id) => {
  return $Http.api(Api.printGetList + '/' + id, null, 'post');
};

/**
 * 分页查询
 * @param params
 */
export const pringPage = (params) => {
  return $Http.api(Api.pringPage, params, 'post');
};

/**
 * 保存
 * @param params
 */
export const printSave = (params) => {
  return $Http.api(Api.printSave, params, 'post');
};
